package com.prs.crm.domain.crm;

import java.util.Date;
import java.util.Set;

import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

import com.prs.crm.domain.BaseEntity;

/**
 * 采购合同
 * @author zhoupeng 2012-02-20
 *
 */
@Entity
@Table(name="crm_contract")
public class CustomerContract extends BaseEntity {
	private static final long serialVersionUID = 1L;
	
	@Id@GeneratedValue(strategy=GenerationType.IDENTITY)
	private Integer id;
	
	private String code;  //序号
	private String proName;  //项目名称
	private String linkman;  //联系人
	private String phone;  //电话
	private String mobile; //手机
	private Date siningTime;  //签约时间
	private String allContractPrice;  //合同总额
	private String yprice;  //已付款
	private String wprice;  //未付款
	private String siningPerson;  //签约人
	private String sharePerson;//共享人员
	
	@ManyToOne
	private CustomerSupplier customerSupplier;  //供应商
	//货物
	@OneToMany(fetch=FetchType.LAZY,mappedBy="customerContract")
	private Set<SupplierFoods> supplierFoods;
	
	
	public String getSharePerson() {
		return sharePerson;
	}

	public void setSharePerson(String sharePerson) {
		this.sharePerson = sharePerson;
	}

	public Set<SupplierFoods> getSupplierFoods() {
		return supplierFoods;
	}

	public void setSupplierFoods(Set<SupplierFoods> supplierFoods) {
		this.supplierFoods = supplierFoods;
	}

	public CustomerSupplier getCustomerSupplier() {
		return customerSupplier;
	}

	public void setCustomerSupplier(CustomerSupplier customerSupplier) {
		this.customerSupplier = customerSupplier;
	}

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public String getProName() {
		return proName;
	}

	public void setProName(String proName) {
		this.proName = proName;
	}

	public String getLinkman() {
		return linkman;
	}

	public void setLinkman(String linkman) {
		this.linkman = linkman;
	}

	public String getPhone() {
		return phone;
	}

	public void setPhone(String phone) {
		this.phone = phone;
	}

	public String getMobile() {
		return mobile;
	}

	public void setMobile(String mobile) {
		this.mobile = mobile;
	}

	public Date getSiningTime() {
		return siningTime;
	}

	public void setSiningTime(Date siningTime) {
		this.siningTime = siningTime;
	}

	public String getSiningPerson() {
		return siningPerson;
	}

	public void setSiningPerson(String siningPerson) {
		this.siningPerson = siningPerson;
	}

	public String getAllContractPrice() {
		return allContractPrice;
	}

	public void setAllContractPrice(String allContractPrice) {
		this.allContractPrice = allContractPrice;
	}

	public String getYprice() {
		return yprice;
	}

	public void setYprice(String yprice) {
		this.yprice = yprice;
	}

	public String getWprice() {
		return wprice;
	}

	public void setWprice(String wprice) {
		this.wprice = wprice;
	}
	
}
